FROM registry.cn-shanghai.aliyuncs.com/fengzhihao/centos:7

ADD target/seata-server-1.4.2.tar.gz /usr/lib/

# RUN wget -P /usr/lib/ https://github.com/seata/seata/releases/download/v1.4.2/seata-server-1.4.2.tar.gz
# RUN tar -xzvf /usr/lib/seata-server-1.4.2.tar.gz -C /usr/lib

RUN mv /usr/lib/seata/seata-server-1.4.2 /usr/lib/
RUN rm -rf /usr/lib/seata-server-1.4.2.tar.gz
RUN rm -rf /usr/lib/seata

CMD [ "/bin/sh","/usr/lib/seata-server-1.4.2/bin/seata-server.sh"]

# docker build -t registry.cn-shanghai.aliyuncs.com/fengzhihao/seata:1.4.2 .

# docker push registry.cn-shanghai.aliyuncs.com/fengzhihao/seata:1.4.2

# docker run --rm -it registry.cn-shanghai.aliyuncs.com/fengzhihao/seata:1.4.2 /bin/bash
